const path = require("path");
function resolve(dir) {
    return path.join(__dirname, dir)
}
const defaultSettings = require('./src/settings.js')
const name = defaultSettings.title || '91885' // page title
module.exports={
    publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
    outputDir: 'dist',
    assetsDir: 'static',
    productionSourceMap: false,
    configureWebpack: {
        // provide the app's title in webpack's name field, so that
        // it can be accessed in index.html to inject the correct title.
        name: name,
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
    lintOnSave:false,
    pluginOptions: {
        'style-resources-loader': {
            'preProcessor': 'scss',
            'patterns': [
                // 文件路径根据实际情况编写
                path.resolve(__dirname, '@/assets/css/*.scss'),
            ]
        }
    },
    css: {
        loaderOptions: {
            scss: {
                // 文件路径根据实际情况编写
                prependData: `@import "@/assets/css/variable.scss";`
            }
        }
    },
}
